<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <title>AutoAPI 运行异常通知</title>
</head>

<body
    style="margin:0;padding:40px;background:#f4f6f8;font-family:-apple-system,Segoe UI,Roboto,Helvetica Neue,sans-serif;color:#333;">
    <div
        style="max-width:660px;margin:0 auto;background:#eeeeee;border-radius:12px;box-shadow:0 6px 18px rgba(0,0,0,0.06);overflow:hidden;">

        <!-- Header -->
        <div style="background:#860f02;color:#fff;padding:28px 32px;font-size:20px;font-weight:600;">
            ❗ AutoAPI 运行异常通知
        </div>

        <!-- Body -->
        <div style="padding:30px 32px;font-size:15px;line-height:1.8;">
            <p style="margin: 0 0 12px;">💥 执行过程中发生以下异常，请及时处理：</p>

            <div
                style="background:#fff1f0;border:1px solid #ffa39e;color:#cf1322;padding:16px;border-radius:8px;white-space:pre-wrap;font-family:monospace;font-size:14px;">
                {{ error }}
            </div>

            {% if task_info %}
            <div style="margin-top:24px;">
                <strong>📝 相关任务信息：</strong>
                <ul style="padding-left:20px;margin-top:12px;">
                    {% for k, v in task_info.items() %}
                    <li><strong>{{ k }}：</strong> {{ v }}</li>
                    {% endfor %}
                </ul>
            </div>
            {% endif %}

            <div style="margin-top:20px;color:#999;font-size:13px;">
                🕒 异常时间：{{ exception_time }}
            </div>
        </div>

        <!-- Footer -->
        <div style="background:#dfdfdf;text-align:center;font-size:12px;color:#777;padding:16px 20px;">
            此邮件由 AutoAPI 自动生成 · 请勿直接回复
        </div>
    </div>
</body>

</html>